package com.lx.data.server.entity

import java.util.Date

import com.alibaba.fastjson.JSONObject
import com.lx.data.server.config.DBConfig.db._

object DBObj {

  case class CenterReceive(tm: Date, msg: String)

  val centerReceive = quote {
    querySchema[CenterReceive](
      "sync.d_center_receive",
      _.tm -> "tm",
      _.msg -> "msg"
    )
  }

  case class HydrologyData(sendTime: Date, dataTime: Date, stationAddr: String, centerAddr: String, funcDesc: String, stationType: String, drp: BigDecimal, z: BigDecimal)

  val hydrologyData = quote {
    querySchema[HydrologyData](
      "sync.hydrology_data",
      _.sendTime -> "send_time",
      _.dataTime -> "data_time",
      _.stationAddr -> "station_addr",
      _.centerAddr -> "center_addr",
      _.funcDesc -> "func_desc",
      _.stationType -> "station_type",
      _.drp -> "drp",
      _.z -> "z"
    )
  }
}
